package com.joker.demo.admin.router.impl;


import com.joker.demo.admin.router.ExecutorRouter;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 随机
 *
 * @author : feixiang.li
 * @since : 2025-07-29 17:28
 */
public class RoundRobinExecutorRouter implements ExecutorRouter {

    private static final AtomicInteger counter = new AtomicInteger(0);

    @Override
    public String route(String jobId, List<String> addressList) {
        if (addressList == null || addressList.isEmpty()) {
            return null;
        }
        return addressList.get(addressList.size() - 1);
    }
}
